<%-- 
    Document   : w_request
    Created on : Nov 8, 2013, 4:56:52 PM
    Author     : Trang
--%>

<%@page import="database.SupplierDAO"%>
<%@page import="model.Supplier"%>
<%@page import="model.Role"%>
<%@page import="model.Staff"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<%
    Staff staff = (Staff) session.getAttribute("staff");

    if (staff == null) {
        response.sendRedirect(request.getContextPath() + "/Administration");
    } else {
%>
<html>
    <style>
        .toggler { width: 500px; height: 200px; }
    </style>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Warehousing Management</title>
        <link href="<%= request.getContextPath()%>/css/style_for_page.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_menu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_addtion.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/adMenu.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/tHeaderFooter.css" rel="stylesheet" type="text/css"/>
        <link href="<%= request.getContextPath()%>/css/style_for_warehousing.css" rel="stylesheet" type="text/css"/>
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
        <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
        <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
        <link rel="stylesheet" href="/resources/demos/style.css" />
        <script>
            $(function() {
                $("#datepicker").datepicker();

            });
        </script>
    </head>

    <% int i = 0;%>   
    <body style="background-color: lightsteelblue;">
        <div class="headerbg">
            <div class="header"> 
                <%@include file="/include/mHeader.jsp" %>
            </div>
            <div class="adContent">
                <div class="adMenu">
                    <%@include file="/include/mMenu.jsp" %>
                </div>
            </div>
        </div>
        <div class="content">
            <div class="registerbg" >
                <s:form theme="simple" action="approve-submit-decision" namespace="/Administration/Member">
                    <div class="registerFormVertical" style="margin-top: 10px;">
                        <table style="float:left; margin-left: 10px; text-align: left;">
                            <tr>
                                <td style="width: 600px; text-align: left;">
                                    <p><b>Requester's Name: </b><s:property  value="request.staff1.firstname+' '+request.staff1.lastname" /></p>
                                    <p><b>Requester's Login Name: </b><s:property  value="request.staff1.loginName" /></p>
                                    <p><b>Request Initial Date: </b><s:property  value="request.createDate" /></p>
                                </td >
                                <td style="width: 300px; text-align: right;">
                                    <p><b>Address: </b><s:property  value="request.staff1.address" /></p>
                                    <p><b>Email: </b><s:property value="request.staff1.email" /></p>   
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="registerFormVertical" style="margin-top: 10px;">
                        <h2 style="margin-left: 10px; text-align: left;">Product Information:</h2>
                        <table style="float:left; margin-left: 10px; text-align: left;">
                            <tr>
                                <td><b>Name: </b></td>
                                <td> <s:property value="request.product.name"/></td> 
                            </tr>
                            <tr>
                                <td><b>Product Code: </b></td>
                                <td><s:property value="request.product.code" /></td>
                            </tr>  
                            <tr>
                                <td><b>Request Quantity:  </b></td>
                                <td><s:property value="request.quantity" /></td>
                            </tr> 
                            <tr>
                                <td><b>Request Reason:  </b></td>
                                <td><b><s:property value="request.reason" /></b></td>
                            </tr> 
                        </table> 
                    </div>

                    <div class="registerFormVertical" style="margin-top: 10px;">
                          <h2 style="margin-left: 10px; text-align: left;">Approver Information:</h2>
                            <table style="float:left; margin-left: 10px; text-align: left;">
                                <tr>
                                    <td>Enforcer</td>
                                    <td><s:select label="Enforcement Staff" 
                                              list="staffs" 
                                              name="idStaff" cssStyle="width: 200px"/></td>
                                </tr>
                                <tr>
                                    <td>Approve:</td>
                                    <td><s:checkbox name="approve" theme="simple" /></td>
                                </tr>

                                <tr>
                                    <td>
                                        <s:reset value="Cancel" cssStyle="width: 96px" theme="simple" />
                                    </td>
                                    <td>
                                        <s:submit value="Submit" cssStyle="width: 96px; margin-left: 132px" theme="simple" />
                                    </td>
                                </tr>
                            </table>
                    </div>
                    <div  class="registerFormVertical" style="margin-top: 10px;">
                        <h2  style="float:left; margin-left: 10px; text-align: left;"> Add Supplier Notes</h2>
                        </br>
                        <p style="text-align: left;">
                         - <b>Check in approve check box then click on Submit if you approve request</b></p>
                        <p>
                         - <b>Do not check in approve check box then click on Submit if you deny request</b></p>
                    </div>

                </s:form>              
            </div>
        </div>
        <footer>
            <div id="footer">
                <%@include file="/include/iFooter.jsp" %>
            </div>   
        </footer>

    </body>
</html>
<%
    }
%>
